package net.xicp.tarbitrary.controller;

import lombok.extern.slf4j.Slf4j;
import net.xcip.tarbitrary.service.FooService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class ApplicationController {

    @DubboReference
    FooService fooService;



    @GetMapping("/call/{name}")
    public String sayHello(@PathVariable("name") String name) {
        log.info("haahah {} call", name);

        String call = fooService.call(name);


        return call;
    }



}
